package com.bcx.crm.java.java8;

import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.stream.Collectors;

public class Map1 {
    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        boolean add = list.add("SF");
        boolean Sadd = list.add("SF");
        List<String> LIST = new LinkedList<>();
        boolean add1 = LIST.add("234");
        LIST.add("234");
    }
    public static void filterTest(){
        List<Artist> allArtist = new ArrayList<>();
        allArtist.add(new Artist("name1","age1","address1"));
        allArtist.add(new Artist("name2","age2","address2"));
        allArtist.add(new Artist("name3","age3","address3"));
        //根据名字筛选集合
        List<Artist> artistList = allArtist.stream().map(artist -> updateArtistAttribute(artist)).collect(Collectors.toList());


    }
    private static Artist updateArtistAttribute(Artist artist){
        artist.setName(artist.getName()+",");
        return artist;
    }
}
